package com.polaris.live.manager

import im.zego.realtimetranslation.ZegoSpeechLanguage
import im.zego.realtimetranslation.ZegoTranslationLanguage

/**
 * 国际化语言切换
 *
 * @author Created by 半仙 on 2023/8/15/015 17:12
 */
object LanguageManage {

    //设置Speech
    fun getTranslationSpeech(string: String): ZegoSpeechLanguage {
        val la = try {
            enumValueOf(string)
        } catch (e: IllegalArgumentException) {
            ZegoSpeechLanguage.en_AU
        }
        return la
    }

    //设置翻译的目标语言
    fun getTranslationLanguage(string: String): ZegoTranslationLanguage {
        val la = try {
            enumValueOf(string)
        } catch (e: IllegalArgumentException) {
            ZegoTranslationLanguage.en
        }
        return la
    }
}